namespace IAM.Interface.Common
{
    using System;
    using System.Web;

    public class EnDeCoding
    {
        public static string Decode(string str)
        {
            try
            {
                if (str == null)
                {
                    return "";
                }
                return HttpUtility.UrlDecode(str.ToString());
            }
            catch
            {
                return "";
            }
        }

        public static string Encode(string str)
        {
            try
            {
                if (str == null)
                {
                    return "";
                }
                return HttpUtility.UrlEncode(str.ToString());
            }
            catch
            {
                return "";
            }
        }
    }
}

